<template>
    <div class='tmp'>
        <div class='newsshow_title'>
            <h4 style='color:#000'>{{info.title}}</h4>
            <p style='color: red'>{{info.add_time | moments}} &nbsp; 浏览次数：{{info.click}}</p>
            <p style='color: #007AFF'>分类：企业</p>
        </div>
        <div v-html='info.content'style='padding: 10px'></div>
        <comment :artid='newsid'></comment>
    </div>
</template>
<script>
    import common from '../field/getfield.js';
    import comment from '../comment/comment.vue';
    export default{
        data(){
            return {
                info:{},
            }
        },
        methods:{
            getinfo(){
                var newsid=this.$route.params.newsid;
                let url = common.apidomain+"/api/getnew/"+newsid
                this.$http.get(url)
                    .then(res=>{
                        this.info=res.body.message[0];
                    })
            }
        },
        created(){
            this.newsid=this.$route.params.newsid;
            this.getinfo();
        },
        components:{
            comment:comment
        }
    }
</script>
<style scoped>

</style>